package com.framework.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.framework.dao.PaymentDao;
import com.framework.entity.sys.SysPayment;
import com.framework.exception.RRException;
import com.framework.exception.menu.RespCode;
import com.framework.service.PaymentService;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;


@Service("paymentService")
public class PaymentServiceImpl extends ServiceImpl<PaymentDao, SysPayment> implements PaymentService {


	@Override
	public SysPayment queryPaymentByDeptId(Long deptId) {
		if(deptId == null || deptId == 0){
			throw new RRException(RespCode.NOT_PARAM_ERROR);
		}
		SysPayment payment = new SysPayment();
		payment.setDeptId(deptId);
		return baseMapper.selectOne(payment);
	}

}
